import React from 'react'
import {Outlet,NavLink} from "react-router-dom"
import { setIcon } from '../globa';
import { mianrouter } from '../router/Router_config';
import { Tabbar } from 'react-vant';
type Props = {}

const Index = (props: Props) => {
  return (
    <div className='box'>
        <header></header>
        <main><Outlet></Outlet></main>
        <footer>
        <Tabbar>
            {
            mianrouter.map((item:any,index:number)=>{
               return  <Tabbar.Item key={index} icon={setIcon(item.icon)}>
            <NavLink to={item.path}>{item.title}</NavLink>
               </Tabbar.Item>
            })
            }
        </Tabbar>
        </footer>
    </div>
  )
}

export default Index